/*
 * Copyright (c) 2014 laidian. All Rights Reserved.
 * 
 * @author yaoyuming
 * 
 * @date 2020-04-20 18:08
 */
package com.yao.ro.mapper.sql;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yao.ro.entity.dto.EquipmentListDto;

import cn.hutool.core.util.ObjectUtil;

/**
 * 材料sql
 * 
 * @author yaoyuming
 * @date 2020/04/20 18:08
 */
public class EquipmentListWrapper {

    /**
     * 功能描述 : 根据装备id，商品id
     * 
     * @param eqmId
     * @param goodsId
     * @author yaoyuming
     * @date 2020/5/22 0022
     * @return {@link Wrapper<EquipmentListDto>}
     */
    public static Wrapper<EquipmentListDto> byEqmIdNGoodsId(Integer eqmId, Integer goodsId) {
        LambdaQueryWrapper<EquipmentListDto> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(ObjectUtil.isNotNull(eqmId), EquipmentListDto::getEqmId, eqmId).eq(ObjectUtil.isNotNull(goodsId),
            EquipmentListDto::getGoodsId, goodsId);

        return wrapper;
    }

}